package com.apache.portal.weixin.core.manager.impl.parser;

import org.jdom.Element;
import org.jdom.JDOMException;

import com.apache.portal.weixin.core.manager.impl.WxRecvMsgBaseParser;
import com.apache.portal.weixin.entity.recv.WxRecvEventMsg;
import com.apache.portal.weixin.entity.recv.WxRecvMsg;

/**
  * description: 事件消息转换代理接口实现
  * @author Hou DaYu 创建时间：下午05:33:07
 */
public class WxRecvEventMsgParser extends WxRecvMsgBaseParser {

	@Override
	protected WxRecvEventMsg parser(Element root, WxRecvMsg msg) throws JDOMException {
		String event = getElementText(root, "Event");
		String eventKey = getElementText(root, "EventKey");

		return new WxRecvEventMsg(msg, event, eventKey);
	}

}
